<?php
/**
 * Created by PhpStorm.
 * User: User
 * Date: 2017/9/18
 * Time: 19:03
 */


echo '<table border="1">';
for ($i=0;$i<100;$i++){
    $red=null;
  if(($i/10)%2==0){
      $red='style="background-color:red "';
  }
    if($i%10==0){
        echo '<tr '.$red.'>';
    }
    echo '<td>'.$i.'</td>';
    if($i%10==9){
        echo '</tr>';
    }
}


echo '</table>';